import { Component } from "react";
import { Provider } from "react-redux";
import models from "./models";
import dva from "./utils/dva";
import "taro-ui/dist/style/index.scss"; // 全局引入一次taro-ui样式即可
import "./app.scss";

class App extends Component {
  componentDidMount() {}

  componentDidShow() {}

  componentDidHide() {}

  componentDidCatchError() {}

  // this.props.children 是将要会渲染的页面
  render() {
    const dvaApp = dva.createApp({
      initialState: {},
      models,
    });
    const store = dvaApp.getStore();
    return <Provider store={store}>{this.props.children}</Provider>;
  }
}

export default App;
